package jsyf.oa.entity.device;

import com.alibaba.fastjson.JSONObject;
import jsyf.oa.ientity.BaseEntity;

import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * Created by 92852 on 2018/4/8.
 */
@Entity
@Table(name = "T_DVC_DEVICELOG", schema = "oa", catalog = "")
public class DeviceLogEntity extends BaseEntity {
    private String principal;

    private String workOrderNum;

    private String workOrderStatus;

    private String customerName;

    private String model;

    private String sequence;

    private String serviceType;

    private String logDetails;

    private String recordDate;

    private String solveDate;

    public String getPrincipal() {
        return principal;
    }

    public void setPrincipal(String principal) {
        this.principal = principal;
    }

    public String getWorkOrderNum() {
        return workOrderNum;
    }

    public void setWorkOrderNum(String workOrderNum) {
        this.workOrderNum = workOrderNum;
    }

    public String getWorkOrderStatus() {
        return workOrderStatus;
    }

    public void setWorkOrderStatus(String workOrderStatus) {
        this.workOrderStatus = workOrderStatus;
    }

    public String getCustomerName() {
        return customerName;
    }

    public void setCustomerName(String customerName) {
        this.customerName = customerName;
    }

    public String getModel() {
        return model;
    }

    public void setModel(String model) {
        this.model = model;
    }

    public String getSequence() {
        return sequence;
    }

    public void setSequence(String sequence) {
        this.sequence = sequence;
    }

    public String getServiceType() {
        return serviceType;
    }

    public void setServiceType(String serviceType) {
        this.serviceType = serviceType;
    }

    public String getLogDetails() {
        return logDetails;
    }

    public void setLogDetails(String logDetails) {
        this.logDetails = logDetails;
    }

    public String getRecordDate() {
        return recordDate;
    }

    public void setRecordDate(String recordDate) {
        this.recordDate = recordDate;
    }

    public String getSolveDate() {
        return solveDate;
    }

    public void setSolveDate(String solveDate) {
        this.solveDate = solveDate;
    }


    @Override
    public JSONObject getJSONObject() {
        JSONObject obj = new JSONObject();
        obj.put("ID", this.getId());
        obj.put("PRINCIPAL", this.getPrincipal());
        obj.put("WORK_ORDER_NUM", this.getWorkOrderNum());
        obj.put("WORK_ORDER_STATUS", this.getWorkOrderStatus());
        obj.put("CUSTOMER_NAME", this.getCustomerName());
        obj.put("MODEL", this.getModel());
        obj.put("SEQUENCE", this.getSequence());
        obj.put("SERVICE_TYPE", this.getServiceType());
        obj.put("LOG_DETAILS", this.getLogDetails());
        obj.put("RECORD_DATE", this.getRecordDate());
        obj.put("SOLVE_DATE", this.getSolveDate());

        return obj;
    }

    @Override
    public String getTableName() {
        return "T_DVC_DEVICELOG";
    }

    @Override
    public JSONObject getJSONColumns() {
        JSONObject obj = new JSONObject();
        obj.put("ID", "id");
        obj.put("PRINCIPAL", "principal");
        obj.put("WORK_ORDER_NUM", "workOrderNum");
        obj.put("WORK_ORDER_STATUS", "workOrderStatus");
        obj.put("CUSTOMER_NAME", "customerName");
        obj.put("MODEL", "model");
        obj.put("SEQUENCE", "sequence");
        obj.put("SERVICE_TYPE", "serviceType");
        obj.put("LOG_DETAILS", "logDetails");
        obj.put("RECORD_DATE", "recordDate");
        obj.put("SOLVE_DATE", "solveDate");
        
        return obj;
    }


}
